﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using TinCan.LRS.Web;
using TinCan.LRS.Web.Controllers;
using XAPI.Data;
using XAPI.Domain;

namespace TinCan.LRS.Web.Tests.Controllers
{
    [TestClass]
    public class StatementsControllerTest
    {
        [TestMethod]
        public void Get()
        {
            // Arrange
            StatementsController controller = new StatementsController(new EFRepository());

            // Act
            Statement result = controller.Get();

        }

        [TestMethod]
        public void StoreGetStatement()
        {
            // Arrange
            StatementsController controller = new StatementsController(new EFRepository());

            var map = new LanguageMap();
            map.Add("en-us", "TEST");

            Statement statement = new Statement
            {
                actor = new Actor
                {
                    mbox = "Test@sprint.com",
                    name = "test"
                },
                id = Guid.NewGuid(),
                //stored = DateTime.Now,
                //verb = new Verb
                //{
                //    Display = map,
                //    Id = "http://test"
                //}
            };

            controller.Put(string.Empty, statement);

            // Act
            Statement result = controller.Get(statement.id.ToString());

            // Assert
            Assert.IsNotNull(result);
        }

    }
}
